from uuid import UUID

import pytest
from pytest_mock import MockerFixture


@pytest.fixture()
def deterministic_uuids(mocker: MockerFixture) -> MockerFixture:
    side_effect = (
        UUID(f"00000000-0000-4000-8000-{i:012}", version=4) for i in range(10000)
    )
    return mocker.patch("uuid.uuid4", side_effect=side_effect)


pytest.register_assert_rewrite("tests.memory_assert")
